package com.example.baomidou.vo;

import com.example.baomidou.entity.SnowOperateLog;
import lombok.Data;

import java.util.List;

@Data
public class Result<T> {

    private Long total;
    private String code;
    private T data;
    private String msg;

    public static Result<PageDto<SnowOperateLog>> success(PageDto<SnowOperateLog> result) {
        Result<PageDto<SnowOperateLog>> result1 = new Result<>();
        result1.setData(result);
        result1.setTotal(result.getTotal());
        result1.setMsg("oK");
        result1.setCode("200");
        return result1;
    }

    public static Result success(){
        Result result = new Result();
        result.setMsg("ok");
        result.setCode("200");
        return result;
    }
}
